package com.punai.prodatalibrary.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.punai.common.annotation.Excel;
import com.punai.common.core.domain.BaseEntity;

import java.util.Date;
import java.util.Objects;

/**
 * 项目附件对象 tab_project_attachment
 *
 * @author tj
 * @date 2023-04-03
 */
@TableName("tab_project_attachment")
public class ProjectInfoAttachment extends BaseEntity {
    private static final long serialVersionUID = 1L;
    private String id;
    @Excel(name = "项目id")
    private String projectId;
    @Excel(name = "附件名称")
    private String attachmentName;
    @Excel(name = "附件类型")
    private String attachmentType;
    @Excel(name = "上传时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date uploadTime;
    @Excel(name = "本地地址")
    private String localFilePath;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getProjectId() {
        return projectId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public String getAttachmentName() {
        return attachmentName;
    }

    public void setAttachmentName(String attachmentName) {
        this.attachmentName = attachmentName;
    }

    public String getAttachmentType() {
        return attachmentType;
    }

    public void setAttachmentType(String attachmentType) {
        this.attachmentType = attachmentType;
    }

    public Date getUploadTime() {
        return uploadTime;
    }

    public void setUploadTime(Date uploadTime) {
        this.uploadTime = uploadTime;
    }

    public String getLocalFilePath() {
        return localFilePath;
    }

    public void setLocalFilePath(String localFilePath) {
        this.localFilePath = localFilePath;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ProjectInfoAttachment that = (ProjectInfoAttachment) o;
        return Objects.equals(id, that.id) && Objects.equals(projectId, that.projectId) && Objects.equals(attachmentName, that.attachmentName) && Objects.equals(attachmentType, that.attachmentType) && Objects.equals(uploadTime, that.uploadTime) && Objects.equals(localFilePath, that.localFilePath);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, projectId, attachmentName, attachmentType, uploadTime, localFilePath);
    }

    @Override
    public String toString() {
        return "ProjectInfoAttachment{" +
                "id='" + id + '\'' +
                ", projectId='" + projectId + '\'' +
                ", attachmentName='" + attachmentName + '\'' +
                ", attachmentType='" + attachmentType + '\'' +
                ", uploadTime=" + uploadTime +
                ", localFilePath='" + localFilePath + '\'' +
                '}';
    }
}
